package com.xzx.spark.core.transform

import org.apache.spark.rdd.RDD
import org.apache.spark.{SparkConf, SparkContext}

/**
 *
 * ${DESCRIPTION}
 *
 * @author xinzhixuan
 * @version 1.0
 * @date 2021-06-26 8:39 下午
 */
object Spark003_Action_Collect {
  def main(args: Array[String]): Unit = {
    val conf = new SparkConf().setMaster("local[*]").setAppName("Spark003_Collect")
    val context = new SparkContext(conf)
    val rdd: RDD[Int] = context.makeRDD(List(3, 4, 1, 2), 2)
    rdd.collect().foreach(println)
    context.stop()
  }
}
